/*
========================================================================
 Name        : SingaporeBusSettingItemListSettings.cpp
 Author      : 
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
/**
 *	Generated helper class which manages the settings contained 
 *	in 'SingaporeBusSettingItemList'.  Each CAknSettingItem maintains
 *	a reference to data in this class so that changes in the setting
 *	item list can be synchronized with this storage.
 */
 
// [[[ begin generated region: do not modify [Generated Includes]
#include <e32base.h>
#include <stringloader.h>
#include <barsread.h>
#include <SingaporeBus.rsg>
#include "SingaporeBusSettingItemListSettings.h"
// ]]] end generated region [Generated Includes]
#include "FunTrace.h"

/**
 * C/C++ constructor for settings data, cannot throw
 */
TSingaporeBusSettingItemListSettings::TSingaporeBusSettingItemListSettings()
	{
	}

/**
 * Two-phase constructor for settings data
 */
TSingaporeBusSettingItemListSettings* TSingaporeBusSettingItemListSettings::NewL()
	{
TFunTrace funTrace(__PRETTY_FUNCTION__);
	TSingaporeBusSettingItemListSettings* data = new( ELeave ) TSingaporeBusSettingItemListSettings;
	CleanupStack::PushL( data );
	data->ConstructL();
	CleanupStack::Pop( data );
	return data;
	}
	
/**
 *	Second phase for initializing settings data
 */
void TSingaporeBusSettingItemListSettings::ConstructL()
	{
TFunTrace funTrace(__PRETTY_FUNCTION__);
	// [[[ begin generated region: do not modify [Generated Initializers]
		{
		HBufC* text = StringLoader::LoadLC( R_SINGAPORE_BUS_SETTING_ITEM_LIST_EDIT_ACCESS_POINTS_BUTTON );
		SetEditAccessPointsButton( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
	SetUseLocation( 1 );
	SetScheduleRequest( 1 );
	SetCachedTilesCount( 0 );
	SetAutoCheckForUpdate( -1 );
	SetGpsGraceTime( 0 );
	SetDisplayCalibrationMessage( 1 );
	// ]]] end generated region [Generated Initializers]
	
	}
	
// [[[ begin generated region: do not modify [Generated Contents]
TDes& TSingaporeBusSettingItemListSettings::EditAccessPointsButton()
	{
	return iEditAccessPointsButton;
	}

void TSingaporeBusSettingItemListSettings::SetEditAccessPointsButton(const TDesC& aValue)
	{
	if ( aValue.Length() < KEditAccessPointsButtonMaxLength)
		iEditAccessPointsButton.Copy( aValue );
	else
		iEditAccessPointsButton.Copy( aValue.Ptr(), KEditAccessPointsButtonMaxLength);
	}

TBool& TSingaporeBusSettingItemListSettings::UseLocation()
	{
	return iUseLocation;
	}

void TSingaporeBusSettingItemListSettings::SetUseLocation(const TBool& aValue)
	{
	iUseLocation = aValue;
	}

TBool& TSingaporeBusSettingItemListSettings::ScheduleRequest()
	{
	return iScheduleRequest;
	}

void TSingaporeBusSettingItemListSettings::SetScheduleRequest(const TBool& aValue)
	{
	iScheduleRequest = aValue;
	}

TInt& TSingaporeBusSettingItemListSettings::CachedTilesCount()
	{
	return iCachedTilesCount;
	}

void TSingaporeBusSettingItemListSettings::SetCachedTilesCount(const TInt& aValue)
	{
	iCachedTilesCount = aValue;
	}

TInt& TSingaporeBusSettingItemListSettings::AutoCheckForUpdate()
	{
	return iAutoCheckForUpdate;
	}

void TSingaporeBusSettingItemListSettings::SetAutoCheckForUpdate(const TInt& aValue)
	{
	iAutoCheckForUpdate = aValue;
	}

TInt& TSingaporeBusSettingItemListSettings::GpsGraceTime()
	{
	return iGpsGraceTime;
	}

void TSingaporeBusSettingItemListSettings::SetGpsGraceTime(const TInt& aValue)
	{
	iGpsGraceTime = aValue;
	}

TBool& TSingaporeBusSettingItemListSettings::DisplayCalibrationMessage()
	{
	return iDisplayCalibrationMessage;
	}

void TSingaporeBusSettingItemListSettings::SetDisplayCalibrationMessage(const TBool& aValue)
	{
	iDisplayCalibrationMessage = aValue;
	}

// ]]] end generated region [Generated Contents]

